<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          
 <html xmlns="http://www.w3.org/1999/xhtml" 
 	   xmlns:ui="http://java.sun.com/jsf/facelets"
 	   xmlns:f="http://java.sun.com/jsf/core" 
	   xmlns:h="http://java.sun.com/jsf/html"
	   xmlns:t="http://myfaces.apache.org/tomahawk">
 	<body>
 	<!-- common menu for all pages -->
		<ui:composition>
			<t:panelGrid columns="2">
				<t:outputText value="Creator"/>
				<t:outputText value="#{manageTestSpecificationsBean.singleTestSpec.creator.name}"/>
				<t:outputText value="Modifier"/>
				<t:outputText value="#{manageTestSpecificationsBean.singleTestSpec.modifier.name}"/>
				<t:outputText value="Creation date"/>
				<t:outputText id="creationDate" value="#{manageTestSpecificationsBean.singleTestSpec.creationDate}">
					<f:convertDateTime pattern="dd-MM-yyyy HH:mm:ss" timeZone= "#{manageTestCasesBean.timeZone}"/>
				</t:outputText>
				<t:outputText value="Modification date"/>
				<t:outputText id="modificationDate" value="#{manageTestSpecificationsBean.singleTestSpec.modificationDate}">
					<f:convertDateTime pattern="dd-MM-yyyy HH:mm:ss" timeZone= "#{manageTestCasesBean.timeZone}"/>
				</t:outputText>
				<t:outputText value="Id"/> 
				<t:outputText value="#{manageTestSpecificationsBean.singleTestSpec.id}"/>
				<t:outputText value="Summary"/>
				<t:panelGroup>
					<t:inputText id="summary"  value="#{manageTestSpecificationsBean.singleTestSpec.summary}">
						<f:validateLength minimum="2" maximum="25" />
					</t:inputText>
					<t:message for="summary" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>
				<t:outputText value="Description"/>
				<t:outputText/>
				<t:panelGroup>
					<t:inputTextarea id="description" value="#{manageTestSpecificationsBean.singleTestSpec.description}">
						<f:validateLength minimum="0" maximum="500" />
					</t:inputTextarea>
					<t:message for="description" errorStyle="color:red; text-decoration:overline" />
				</t:panelGroup>
				<t:outputText/>
				<t:outputText value ="Product"/>
				<t:selectOneMenu 
						value="#{manageTestSpecificationsBean.singleTestSpec.product}" 
						converter="#{manageTestSpecificationsBean.productConverter}" >
					<f:selectItems value="#{manageTestSpecificationsBean.productList}" />	
				</t:selectOneMenu>
		  	 	<t:commandButton action="#{manageTestSpecificationsBean.editTestSpec}" value="save" />
		   		<t:commandButton action="specsList" value="cancel" />	 	
	   		</t:panelGrid>	
	   </ui:composition>
   </body>
 </html>